package top.truism.auth.util;

import top.truism.auth.web.pojo.Permission;
import top.truism.auth.web.pojo.User;

import java.util.ArrayList;
import java.util.List;

public class MockUtil {

  public static List<Permission> createPermissions() {
    List<Permission> permissionList = new ArrayList<>();
    permissionList.add(new Permission("添加图书", "图书模块", true));
    permissionList.add(new Permission("删除图书", "图书模块", true));
    return permissionList;
  }

  public static boolean isLogin(User user) {
    return user.getUsername().equals("admin") && user.getPassword().equals("admin");
  }
}
